<?php
    $user = $this->controller->getUser();
    
    $vote_info = $this->layout()->vote_info;
    $vote_list = array();
    foreach($vote_info as $thread_id=>$thread){
        $now = time();
        foreach($thread as $phase_id=> $phase){
            if($phase->view_enable==1){
                $vname = $phase->thread_name;
                $vid = $thread_id."_".$phase_id;
                $vote_list[] = array("name"=>$vname, "votephoto_category"=>$phase->votephoto_category, "vid"=>$vid, "thid"=>$thread_id, "pid"=>$phase_id);
            }
        }
        
    }
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title><?echo ($this->layout()->title!="" ? $this->escape($this->layout()->title) : "") ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="generator" content="">

    <script type="text/javascript">
      
        var fadeimages=new Array()
        <?php 
        $totalImg = 14;
        for($i=0; $i<$totalImg; $i++){
        ?>
        fadeimages[<?php echo $i;?>]=["<?php echo $this->layout()->spath;?>/slide/<?php echo str_pad($i+1, 3, '0', STR_PAD_LEFT);?>.jpg", "", ""]
        <?php
        }
        ?>

    </script>
    <!--Import CSS files:-->
    <link href="<?php print $this->layout()->spath; ?>/css/style.css" rel="stylesheet" type="text/css" />       
    <!--End css files-->
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/swfobject.js"></script>
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/jquery.js"></script>
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/event_cover_comment.js"></script>
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/fadeimage.js"></script>

   <!--[if lt IE 7]>
        <script defer type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/pngfix.js"></script>
        <link href="<?php echo EVENT_STATIC_SERVER;?>/css/ie6fix.css" rel="stylesheet" type="text/css" />
    <![endif]-->
</head>
<body>
<div id="container"  class="page-center">
    <!--Menu tamtay:-->
    <div id="menu_tt" class="menu_tt">
        <div class="menu_tt-left">
            <a href="http://www.tamtay.vn">Tamtay.vn</a> | 
            <a href="http://video.tamtay.vn">Video</a> | 
            <a href="http://photo.tamtay.vn">Ảnh</a> | 
            <a href="http://music2.tamtay.vn">Nhạc</a> | 
            <a href="http://blog.tamtay.vn">Blog</a> | 
            <a href="http://www.tamtay.vn/event">Sự kiện</a> | 
            <a href="http://www.tamtay.vn/bookmark/home">Web hay</a> | 
            <a href="http://www.tamtay.vn/group">Nhóm</a> | 
            <a href="http://www.tamtay.vn/network/home">Network</a> | 
            <a href="http://www.tamtay.vn/group/forum">Diễn đàn</a> | 
        </div>
        <!--<div class="ttuser">Chào <strong>do_son_dem_nay</strong> - <a href="#">Thoát</a></div>-->
        <div style="padding-top:0px" class="menu_tt-right">
            <?php if ($user->uid) {?>
            Chào <strong><?php echo $user->name; ?></strong> - <a href="<?php echo IDS_LOGOUT_URL;?>">Thoát</a>
            <?php } else {?>
                <a href="<?php echo IDS_LOGIN_URL;?>">Đăng nhập</a>&nbsp;|&nbsp;
                <a href="<?php echo IDS_REGISTER_URL;?>">Đăng ký</a>
            <?php }?>    
          </div>
    </div>
    
    <!--Banner:-->
    <div id="banner" class="banner"></div>
    
    <!--Header:-->
    <div class="menu_event">
             <div class="menu_event_1">
                 <marquee onmouseout="this.start()" onmouseover="this.stop()">
                       Đêm chung kết: 18h00   ngày Chủ nhật 24/05/2009 tại Hội trường E4 Đại học Công Nghiệp Thành phố Hồ Chí Minh
                     </marquee>
               </div>
             <div class="menu_event_2">
                <span><a href="http://www.tamtay.vn/event/<?php echo $this->layout()->short_cut; ?>" title="Trang chủ" style="color:#ff6600">Trang chủ</a></span><img src="<?php print $this->layout()->spath; ?>/images/icon_doc.gif" alt="" /> 
                <span><a href="http://www.tamtay.vn/event/<?php echo $this->layout()->short_cut; ?>/desc"> Giới thiệu </a></span><img src="<?php print $this->layout()->spath; ?>/images/icon_doc.gif" alt="" /> 
                <?php 
                for($i=0; $i<count($vote_list); $i++){
                    $vote = $vote_list[$i];
                    if($vote["votephoto_category"] > 0){
                    ?>
                <span><a href="http://photo.tamtay.vn/category/browse/<?php echo $vote["votephoto_category"];?>" title="Tin tức"><?=$vote["name"];?></a></span><img src="<?php print $this->layout()->spath; ?>/images/icon_doc.gif" alt="" />
                <?php 
                    }else {?>
                <span><a href="/event/<?php echo $this->layout()->short_cut; ?>/votedlist/<?php echo $vote["thid"]."/".$vote["pid"];?>" title="Tin tức"><?=$vote["name"];?></a></span><img src="<?php print $this->layout()->spath; ?>/images/icon_doc.gif" alt="" />
                <?php 
                    } // End of if 
                }
                ?>
                <span><a href="/event/<?php echo $this->layout()->short_cut; ?>#mark_news"> Tin tức </a></span><img src="<?php print $this->layout()->spath; ?>/images/icon_doc.gif" alt="" />
                <span><a href="/event/<?php echo $this->layout()->short_cut; ?>#mark_video"> Video </a></span><img src="<?php print $this->layout()->spath; ?>/images/icon_doc.gif" alt="" />
             </div>
     </div>
    
    <div class="clear"></div>    
    
    <div style="margin:0 auto; width:980px;" id="noidung">
        <?php echo $this->layout()->content;?>
    </div>
        
    <div class="clear"></div>
    
    <!--Footer:-->
    <div id="footer" class="page-center">
        <p class="copyright">Copyright by tamtay.vn</p>
        <p class="logo"><a href="http://www.tamtay.vn" title="www.tamtay.vn"><img src="<?php print $this->layout()->spath; ?>/images/logo_tt_footer.gif" /></a></p>
    </div>
</div>
        
</body>
</html>